<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // 对象简写
        let name = "lawang";
        let age = 19;

        // let obj = {
        //     name:name,
        //     age:age
        // }

        // 对象简写 - 前提条件：属性名和变量名一致
        let obj = {
            name,
            age
        }

        console.log(obj);



    </script>
</body>
</html>